var oGetVars = new (function (sSearch) {
	sSearch = unescape(sSearch);//强制执行解码
    console.log(sSearch,'sSearch')
	var rNull = /^\s*$/, rBool = /^(true|false)$/i;
	function buildValue(sValue) {
		if (rNull.test(sValue)) { return null; }
		if (rBool.test(sValue)) { return sValue.toLowerCase() === "true"; }
		if (isFinite(sValue)) { return parseFloat(sValue); }
		if (isFinite(Date.parse(sValue))) { return new Date(sValue);
		}
		return sValue;
	}
	if (sSearch.length > 1) {
		for (var aItKey, nKeyId = 0, aCouples = sSearch.substr(1).split("&"); nKeyId < aCouples.length; nKeyId++) {
			let temp = aCouples[nKeyId]
			let key = temp.indexOf('=');
			aItKey = [temp.substring(0,key),temp.substring(key+1)];
			this[unescape(aItKey[0])] = aItKey.length > 1 ? buildValue(unescape(aItKey[1])) : null;
		}
	}
})(window.location.href.substring(window.location.href.indexOf('?')))



export {oGetVars}